/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Data;


public class TaskGroup {
    private Task[] taskGr;
    private String name;
    private String icon;
    private int size;
    private int index;
    
    public TaskGroup(String n, String icon){
        taskGr = new Task[15];
        //int index = ListTaskGroup return countItem;
        name = n;
        this.icon = icon;
        size = 0;
    }
    
    
    
    public void add(Task t){
            taskGr[size] = t;
            size++;
    }
    public void removeAt(int index){
        
        for(int i = index; i < size; i++){
            taskGr[i-1] = taskGr[i];
        }
        size--;
    }
    public Task getAt(int i){
        return taskGr[i];
    }
    public String getName(){
        return name;
    }
    public int getSize(){
        return size;
    }
    public int getIndex(){
        return index;
    }
    public String getIcon(){
        return icon;
    }
    public void setIndex(int n){
        index = n;
    }
    
    
}
